<?php

namespace App\Http\Controllers\Common;

use App\Http\Controllers\Controller;

class AppController extends Controller
{
    //
    public function asc_sort($params = array()): string
    {
        if (!empty($params)) {
            $p = ksort($params);
            if ($p) {
                $str = '';
                foreach ($params as $k => $val) {
                    $str .= $k . '=' . $val . '&';
                }
                $strs = rtrim($str, '&');
                return $strs;
            }
        }
        return '';
    }
}
